/*
 * Plan.h-
 *
 *  Created on: 14 Feb 2012
 *      Author: mohab
 */

#ifndef PLAN_H_
#define PLAN_H_

#include "World.h"
#include "Commands.h"
#include "Agent.h"
#include "Server.h"
#include <cstdio>

int DISCOVERY_PRIORITY1[] = { 9, 10 };
int DISCOVERY_PRIORITY2[] = { 5, 6, 9, 2 };
int DISCOVERY_PRIORITY3[] = { 8, 4, 3, 1 };


class Plan {

public:
	Plan(World world, Agent* agents, int agentCount);
	bool nextStep();
	bool goalReached();
	void Discover(int machineNo);
	void PostDiscovery();
	int getClosestPuck(int type); // Gets the closest puck of a given type (signature not finalised)
	int getClosestMachine(Enums::MachineType type);
	int getWorkingDG();
	//int main(int a, char **arg);

	//int DISCOVERY_PRIORITY1 [] = {8,10};
	//int DISCOVERY_PRIORITY2 [] = {5,7,9,6};
	//int DISCOVERY_PRIORITY3 [] = {4,3,1,2};

	int m1Discovered;
	int m2Discovered;
	int m3Discovered;
	int pck_counter;
	World world;
	int agentCount;
	Agent* agents;
	bool discovery;
	int machineToDiscover;
	bool machineDiscovered;
	int noDiscoveredMachines;
	bool STP_1;
	bool STP_2;
	bool STP_3;
	bool STP_4;
	bool STP_5;
	bool STP_6;
	bool STP_7;

};

#endif /* PLAN_H_ */
